Skip to content

feat: sample explorer#2764

Open
tejapathakoti wants to merge 19 commits intomainfrom
388-sample-transformation-explorer
Open

feat: sample explorer#2764
tejapathakoti wants to merge 19 commits intomainfrom
388-sample-transformation-explorer

Conversation

@tejapathakoti
Copy link
Copy Markdown
Collaborator

  • rather 1-story 1-commit than sub-atomic commits

  • commit title is meaningful => git history search

  • commit description is helpful => helps the reviewer to understand the changes

  • code is up-to-date with the latest developments of the target branch (rebased to it or whatever) => ⏩-merge for linear history is favoured

  • added code is linted

  • tests are passing (at least locally): we still have some random test failure on CI. thinking of asking spec/examples.txt to be commited

  • in case the changes are visible to the end-user,  video or screenshots should be added to the PR => helps with user testing

  • testing coverage improvement is improved.

  • CHANGELOG :  add a bullet point on top (optional: reference to github issue/PR )

  • parallele PR for documentation  on docusaurus  if the feature/fix is tagged for a release

@PiTrem PiTrem changed the title 388 sample transformation explorer feat: sample explorer Dec 3, 2025
@TasnimMehzabin TasnimMehzabin force-pushed the 388-sample-transformation-explorer branch from 5b362ff to 512dd9f Compare March 12, 2026 13:08

module Chemotion
class ExplorerAPI < Grape::API

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning.


after_validation do
@collection = current_user
.collections
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Align .collections with current_user on line 14.

after_validation do
@collection = current_user
.collections
.where(is_shared: false)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Align .where with current_user on line 14.

@collection = current_user
.collections
.where(is_shared: false)
.find_by(id: params[:collection_id])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Align .find_by with current_user on line 14.


get do
samples = @collection
.samples
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Align .samples with @collection on line 23.

product_ids: r.products.pluck(:id),
created_at: r.created_at,
updated_at: r.updated_at,
reaction_svg_file: r.reaction_svg_file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.

}
end


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/EmptyLines: Extra blank line detected.


molecule_ids = samples.pluck(:molecule_id).compact.uniq
molecules = Molecule
.where(id: molecule_ids)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Align .where with Molecule on line 46.

molecule_ids = samples.pluck(:molecule_id).compact.uniq
molecules = Molecule
.where(id: molecule_ids)
.select(:id, :cano_smiles, :inchikey, :iupac_name)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/MultilineMethodCallIndentation: Align .select with Molecule on line 46.

{
samples: samples.as_json,
reactions: reactions.as_json,
molecules: molecules.as_json
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.

@github-actions
Copy link
Copy Markdown

LCOV of commit 512dd9f during CI - Ruby Lint, RSpec, and code coverage #1054

Summary coverage rate:
  lines......: 66.9% (18268 of 27320 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@tejapathakoti tejapathakoti marked this pull request as ready for review April 10, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant